<%@page import="java.util.ArrayList"%>
<%@page import="java.util.HashMap"%>
<%@page import="Filter.DAO"%>
<%@page contentType="text/html" pageEncoding="UTF-8"%>
<%
    String product_id=request.getParameter("product_id");
    String sql="SELECT * from product where product_id="+product_id;
    ArrayList<HashMap> rslist = new DAO().query(sql, new String[]{});
    HashMap map =rslist.get(0);
%>
<!DOCTYPE html>
<html>
    <head>
        <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
        <title>JSP Page</title>
    </head>
    <body>
        <form action="ProductUpdate2.jsp" method="post">                       
            產品名稱：　<input type="text" name="product_name" value="<%=map.get("product_name")%>" /><br>
            產品縮圖：　<input type="text" name="img_url" value="<%=map.get("img_url")%>"/><br>
            產品價格：　<input type="text" name="product_price"value="<%=map.get("product_price")%>" /><br>
            產品介紹：　<input type="text" name="product_info" value="<%=map.get("product_info")%>" /><br>
            庫存量： &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; <input type="text" name="product_stock" value="<%=map.get("product_stock")%>" /><br>           
            <input type="hidden" name="product_id" value="<%=map.get("product_id")%>" />
            <input type="submit" value="確定"/><br>        
        </form>
    </body>
</html>
